package com.hyz.asset.controller;

import com.hyz.asset.pojo.Asset;
import com.hyz.asset.service.AssetService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import java.util.List;

/**
 * @author HGD
 * @date 2022/9/24 21:48
 */
@RestController
@RequestMapping("/asset")
public class AssetController {
    @Autowired
    private AssetService assetService;

    @PostMapping("/batchInsertAsset")
    public boolean batchInsertAsset(@RequestBody List<Asset> list) {
        return assetService.batchInsertAsset(list);
    }

    @PostMapping("/getUnassignedList")
    public List<Asset> getUnassignedList() {
        return assetService.getUnassignedList();
    }
}
